![]() |
PATH![]() |
![]() ![]() |
Here's how to declare a background drawing function, if you were to name the function MyThemeEraseProc :
pascal void MyThemeEraseProc (
const Rect *bounds,
UInt32 eraseData,
SInt16 depth,
Boolean isColorDev);
At the time your drawing function is called, the foreground text color and mode is already set to draw in the correct state (active or inactive) and correct color for the theme. You do not need to set the color unless you have special drawing needs. If you do have special drawing needs, you should supply the depth value and the value of the isColorDevice parameter to the function IsThemeInColor to determine whether or not you should draw in color. Note that the Appearance Manager calls your MyThemeEraseProc function for every device that the bounds rectangle intersects, so your application does not need to call the DeviceLoop function itself.